<!-- 切换项目工程 -->
<script type="text/ng-template" id="changePlanProject.html">
    <div class="modal-header">
        <h3 class="modal-title">切换分支</h3>
    </div>
    <div class="modal-body">
        <input type="radio" value="0" name="projectType" ng-click="proTypeChange();" ng-model="info.projectType"/>&nbsp;&nbsp;新建工程
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input type="radio" value="1" name="projectType" ng-click="proTypeChange();" ng-model="info.projectType"/>&nbsp;&nbsp;已有工程
        <br>
        <br>
        <div ng-show="info.projectType == '0'">
            <table width="95%">
                <tr style="line-height: 40px;">
                    <td> 工程:</td>
                    <td>{{info.trunkName}}</td>
                </tr>
                <tr style="line-height: 40px;">
                    <td> 来源:</td>
                    <td>
                        <select style="width: 205px;" ng-model="info.svn_form">
                            <option value="{{i.name}}" ng-repeat="i in info.proInfo.svn_list">
                                {{i.name}}
                            </option>
                        </select>

                    </td>
                </tr>
                <tr style="line-height: 40px;">
                    <td> 分支版本:</td>
                    <td>
                        <input style="width: 205px;line-height: 20px;" type="text"
                               ng-model="info.proInfo.branch_num"
                               ng-change="updateBranch_num()">

                    </td>

                </tr>
                <tr style="line-height: 40px;">
                    <td> 项目代号:</td>
                    <td>
                        <input style="width: 205px;line-height: 20px;" ng-change="updatePlanCode()" type="text"
                               ng-model="info.planInfo.plan_code">
                        <button class="btn btn-primary" type="button" ng-click="checkProjectPlanCode()">校验</button>
                    </td>

                </tr>
                <tr ng-show="info.msg!=''">
                    <td colspan="2"><span style="color: red">{{info.msg}}</span></td>
                </tr>
                <tr style="line-height: 40px;">
                    <td> 目标工程:</td>
                    <td>
                        {{info.proInfo.trunk_name}}-{{info.proInfo.branch_num}}.{{info.planInfo.plan_code}}
                    </td>
                </tr>
            </table>
        </div>
        <div ng-show="info.projectType == '1'">
            <span style="color: red;">不能选择主干工程进行切换,如果要使用主干,需要选择"新建工程",然后从主干上创建一个新分支</span>
            <br>
            <br>
            <select ng-model="info.selectProName">
                <option ng-repeat="pro in info.proList" value="{{pro.projectName}}">{{pro.projectName}}</option>
            </select>
        </div>
    </div>
    <div class="modal-footer">
        <button class="btn btn-primary" type="button"
                ng-disabled="(info.projectType == '0' && info.msg!='') || (info.projectType == '1'&&info.selectProName == info.trunkName)"
                ng-click="save();">保存
        </button>
        <button class="btn btn-primary" type="button" ng-click="cancel();">关闭</button>
    </div>
</script>